//
//  UIImageView+Bussiness.m
//  Meng800
//
//  Created by 姚宗超 on 14-8-31.
//  Copyright (c) 2014年 点财网. All rights reserved.
//

#import "UIImageView+Bussiness.h"
#import "UIImageView+WebCache.h"
#import "UIColor+HexColors.h"
#import "Masonry.h"

@implementation UIImageView (Bussiness)

// 设置圆头像
- (void)setRoundedImage:(UIImage *)image
{
    self.layer.cornerRadius = self.width/2.0f;
    self.layer.masksToBounds = YES;
    [self setImage:image];
}

// 根据URL设置圆头像
- (void)setRoundedImageWithUrl:(NSString *)url placeHolderImage:(UIImage *)defaultImage
{
    self.layer.cornerRadius = self.width/2.0f;
    self.layer.masksToBounds = YES;
    [self sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:defaultImage];
}

@end
